package cn.huiyunche.base.service.form;

import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @FileName: cn.huiyunche.base.service.form
 * @Description: 线路里程变更
 * @author: Aaron
 * @date: 2017/3/13 下午4:55
 */
public class ScPriceconfMileForm {

    private Integer id;

    @NotNull(message = "请选择线路")
    @Min(value = 1, message = "线路主键必须大于0")
    private Integer routeId;

    @NotNull(message = "请输入里程")
    @DecimalMin(value = "0.01", message = "里程必须大于0.01公里")
    @DecimalMax(value = "10000", message = "里程不能大于10000公里")
    private BigDecimal currentValue;

    @NotNull(message = "请输入生效时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date effectiveDate;

    private Date invalidDate;

    private Date gmtCreate;

    private Date gmtUpdate;

    private String creator;

    public Integer getId() {
        return id;
    }

    public ScPriceconfMileForm setId(Integer id) {
        this.id = id;
        return this;
    }

    public Integer getRouteId() {
        return routeId;
    }

    public ScPriceconfMileForm setRouteId(Integer routeId) {
        this.routeId = routeId;
        return this;
    }

    public BigDecimal getCurrentValue() {
        return currentValue;
    }

    public ScPriceconfMileForm setCurrentValue(BigDecimal currentValue) {
        this.currentValue = currentValue;
        return this;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public ScPriceconfMileForm setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
        return this;
    }

    public Date getInvalidDate() {
        return invalidDate;
    }

    public ScPriceconfMileForm setInvalidDate(Date invalidDate) {
        this.invalidDate = invalidDate;
        return this;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public ScPriceconfMileForm setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
        return this;
    }

    public Date getGmtUpdate() {
        return gmtUpdate;
    }

    public ScPriceconfMileForm setGmtUpdate(Date gmtUpdate) {
        this.gmtUpdate = gmtUpdate;
        return this;
    }

    public String getCreator() {
        return creator;
    }

    public ScPriceconfMileForm setCreator(String creator) {
        this.creator = creator;
        return this;
    }

    @Override
    public String toString() {
        return "ScPriceconfMileForm{" +
                "id=" + id +
                ", routeId=" + routeId +
                ", currentValue=" + currentValue +
                ", effectiveDate=" + effectiveDate +
                ", invalidDate=" + invalidDate +
                ", gmtCreate=" + gmtCreate +
                ", gmtUpdate=" + gmtUpdate +
                ", creator='" + creator + '\'' +
                '}';
    }
}
